import Home from "@/page/Home"
import Login from "@/page/Login"
import NotFound from "@/page/404"
import { Navigate, useRoutes } from "react-router-dom"
import NotAccessed from "@/page/403"

const router = [
  {
    path: "/",
    element: <Home />,
    children: []
  },
  {
    path: "login",
    element: <Login />
  },
  {
    path: "*",
    element: <Navigate to="/404" />
  },
  {
    path: "/404",
    element: <NotFound />
  },
  {
    path: "/403",
    element: <NotAccessed />
  }
]

export default function Router() {
  return useRoutes(router)
}
